<!DOCTYPE html>
<html  xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
    <title>首页</title>
    <link rel="stylesheet" th:href="@{/layui/layui.css}" />
    <link rel="stylesheet" th:href="@{/css/index.css}"/>
    <link rel="stylesheet" th:href="@{/css/image.css}"/>
    <link rel="stylesheet" th:href="@{/css/indexq.css}"/>

    <script type="text/javascript" th:src="@{/js/jquery-3.2.1.js}"></script>
</head>
<body class="layui-layout-body ">
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <!--<div class="logo">信息学院宿舍管理系统</div>-->
        <div><img src="image/tim.png" style="position: absolute;width: 50px; left:380px;top: 6px" /></div>
        <div ><img src="image/logop.png" style="width: 700px;margin-top: 10px;margin-left: 450px;"/></div>

        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item">
                <a href="javascript:;">
                    <img src="image/yh.jpg" class="layui-nav-img" />
                        <span th:unless="${session.user eq null}" th:text="${session.user.getName()}"></span>
                </a>
                <dl class="layui-nav-child">
                    <dd><a id="pd">个人资料</a></dd>
                    <dd><a id="cp">安全设置</a></dd>
                </dl>
            </li>
            <li class="layui-nav-item"><a href="/dor/login">退出登录</a></li>
        </ul>
    </div>

    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
            <ul class="layui-nav layui-nav-tree"  lay-filter="test">

                <li class="layui-nav-item layui-nav-itemed">

                        <a class="wen1" href="javascript:;"><i class="layui-icon ima1">&#xe60a;</i>公告</a>
                    <dl class="layui-nav-child">
                        <dd><a id="gongcha" class="wen">公告查看</a></dd>
                        <dd><a id="gongfa" class="wen">公告发布</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item layui-nav-itemed">
                    <a class="wen1" href="javascript:;"><i class="layui-icon ima">&#xe612;</i>&nbsp;学生管理</a>
                    <dl class="layui-nav-child">
                        <dd><a id="tostu" class="wen">学生查看</a></dd>
                        <dd><a id="as" class="wen">批量增加</a></dd>

                    </dl>
                </li>



                <li class="layui-nav-item">
                    <a class="wen1" href="javascript:;"><i class="layui-icon ima2">&#xe68e;</i>&nbsp;查寝情况</a>
                    <dl class="layui-nav-child">
                        <dd><a id="ws" class="wen">卫生情况</a></dd>
                        <dd><a id="weigui" class="wen">违规情况</a></dd>
                        <dd><a id="jifen" class="wen">积分管理</a></dd>
                    </dl>
                </li>

                <li class="layui-nav-item">
                    <a class="wen1" href="javascript:;"><i class="layui-icon ima3">&#xe62a;</i>&nbsp;&nbsp;投票管理</a>
                    <dl class="layui-nav-child">
                        <dd><a id="addvote" class="wen">发布投票</a></dd>
                        <dd><a id="tq" class="wen">投票情况</a></dd>
                    </dl>
                </li>
            </ul>
        </div>
    </div>

    <div class="layui-body">
        <!-- 内容主体区域 -->
        <!--<div style="padding: 15px;">内容主体区域</div>-->
        <!--<iframe sindexq.htmlhtml" width="100%" height="100%"></iframe>-->
        <iframe id="indexbody"  width="100%" height="100%"></iframe>
    </div>



    <div class="layui-footer">

    </div>
</div>
<script th:src="@{/layui/layui.all.js}"></script>
<script>
    //JavaScript代码区域
    layui.use('element', function(){
        var element = layui.element;

    });

    $(document).ready(function () {
        /** 跳转学生模块. */
        $('#tostu').click(function () {
            $('#indexbody').attr('src', '/dor/studemo');
        });

        $('#todm').click(function () {
            $('#indexbody').attr('src', '/dor/dmdemo');
        });
        $('#gongcha').click(function() {
            $('#indexbody').attr('src','/dor/textdemo')
        });
        $('#gongfa').click(function() {
            $('#indexbody').attr('src','/dor/Addtextdemo')
        });
        $('#weigui').click(function() {
            $('#indexbody').attr('src','/dor/ruledemo')
        });
        $('#pd').click(function() {
            $('#indexbody').attr('src','/dor/pddemo')
        });
        $('#cp').click(function() {
            $('#indexbody').attr('src','/dor/cpdemo')
        });

        $('#indexbody').attr('src','/dor/indexdemo');

        $('#addvote').click(function() {
            $('#indexbody').attr('src','/dor/addvote')
        });
        $('#as').click(function() {
            $('#indexbody').attr('src','/dor/addstudent')
        });
        $('#ts').click(function() {
            $('#indexbody').attr('src','/dor/teaSelect')
        });
        $('#tq').click(function() {
            $('#indexbody').attr('src','/dor/voteLook')
        });
        $('#ws').click(function() {
            $('#indexbody').attr('src','/dor/heaSelect')
        });
        $('#jifen').click(function() {
            $('#indexbody').attr('src','/dor/jifen')
        });

    });

</script>
<script th:inline="javascript">
    var t = [[${t}]];
    console.log(t);
    if (t === 1){
        layer.open({
            content: '发布成功'
        });

    }
</script>


</body>
</html>